Skip to content

Conversation

@arturobernalg
Copy link
Member

This PR is based on PR #401, which proposed
adding the ARRAY_LEN macro to improve code readability and maintainability. The original
PR was abandoned and had conflicts, so I have rebased it, resolved issues, and integrated
the changes.

@notroj
Copy link
Collaborator

notroj commented Mar 6, 2025

This looks better - thanks for redoing it - but it should be AP_ARRAY_LEN() rather than just ARRAY_LEN() to avoid namespace conflicts. Hopefully you can change it with a sed command :)

This commit introduces the AP_ARRAY_LEN macro to simplify array length calculations
by replacing occurrences of `sizeof(a)/sizeof(a[0])` with `AP_ARRAY_LEN(a)`.
@arturobernalg
Copy link
Member Author

This looks better - thanks for redoing it - but it should be AP_ARRAY_LEN() rather than just ARRAY_LEN() to avoid namespace conflicts. Hopefully you can change it with a sed command :)

This looks better - thanks for redoing it - but it should be AP_ARRAY_LEN() rather than just ARRAY_LEN() to avoid namespace conflicts. Hopefully you can change it with a sed command :)

Agreed. I've implemented the changes and updated the committee message.

@thomasmey
Copy link

Also thanks from my side!

@notroj
Copy link
Collaborator

notroj commented Mar 18, 2025

Can you make your fork writable by committers? I'd like to test a couple of additional changes to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants